//
//  Extention+UIImageView.swift
//  WeiboSwift
//
//  Created by 战场原黑仪 on 16/7/22.
//  Copyright © 2016年 战场原黑仪. All rights reserved.
//

import UIKit
import SDWebImage

extension UIImageView {
    
    //便利构造函数
    convenience init(imageName: String) {
        self.init(image: UIImage(named: imageName))
    }
    
    //封装SDWebImage
    func bg_setImageWithURL(urlString: String?, placeholderImageName: String) {
        self.sd_setImageWithURL(NSURL(string: urlString ?? ""), placeholderImage: UIImage(named: placeholderImageName))
    }
    
    
}